package com.zdlt.admin.api.mapper;

import com.zdlt.admin.api.dto.ArticleQuery;
import com.zdlt.admin.api.domain.Article;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper {
    List<Article> query(@Param("query") ArticleQuery query);

    int insert(Article article);

    int count(@Param("query") ArticleQuery query);

    int delete(@Param("articleId") String articleId);

    Article get(@Param("id") Long id);

    int update(@Param("id") String id, @Param("article") Article article);
}
